package com.carrental.crm.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.carrental.crm.entity.Order;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 订单Mapper接口
 */
@Mapper
public interface OrderMapper extends BaseMapper<Order> {

    /**
     * 分页查询当前客户的订单
     * 
     * @param page       分页参数
     * @param customerId 客户ID
     * @param orderNo    订单编号
     * @param status     订单状态
     * @return 订单分页
     */
    Page<Order> selectOrdersByCustomerId(Page<Order> page,
            @Param("customerId") Long customerId,
            @Param("orderNo") String orderNo,
            @Param("status") Integer status);
}